import time
import pandas as pd
from alpha101_adjusted import Alphas

data = pd.read_csv('./data/dataPerformance.csv')
# print("---data---")
# print(data)
# df = data.pivot(index='tradetime', columns='securityid', values='close')
df = data.pivot(index='tradetime', columns='securityid')
# print("---pivot---")
# print(df)
# 279.8194098472595
t1 = time.time()
result = Alphas(df).alpha001()
t2 = time.time()
print(f"---time---: {t2 - t1}")
print("---result---")
# print(result)
# result.to_csv('./result_pandas_origin.csv')

# inner clone: 0.004589080810546875
# stddev: 0.496243953704834
# rank: 124.9221601486206
# ---time---: 240.95168685913086